<?php
/**
 * Created by PhpStorm.
 * User: 技术员专用
 * Date: 2019/3/14
 * Time: 14:28
 */
$client=new Swoole\Redis;
$client->connect('127.0.0.1',6379,function ($client,$result){
    if ($result === false) {
        echo "connect to redis server failed.\n";
        return;
    }else{
        echo $result;
    }
    $client->set('test','11111',function ( $client,$result){
        var_dump($result);
    });
    $client->get('test',function ( $client,$result){
        var_dump($result);
    });
    $client->close();
});
